<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<jsp:include page="/core/tool/resources.jsp"></jsp:include>
	<script src="./bills.js"></script>
	<script src="../../smdc/security/secselect.js"></script>
		
</head>

<body>
	<div id="toolbar">
	   <a class="easyui-linkbutton" iconCls="icon-add" onclick="click_add()">新增</a>
	   <a class="easyui-linkbutton" iconCls="icon-edit" onclick="click_row_edit()">编辑</a>
       <a class="easyui-linkbutton" iconCls="icon-remove" onclick="click_delete()">删除</a>
       <a class="easyui-linkbutton" iconCls="icon-add" onclick="click_open_upload()">上传</a>
       <br/>
       <form id="search_param">
			代码: <input id="secIdSeach" name="secId" data-options="width:150">
			交易类别：<input class="easyui-combobox" name="billType" 
					data-options="valueField:'code',textField:'name',data:frame.flex.getValue('TRADE_TYPE')"/>
			开始日期: <input class="easyui-datebox" name="beginDate"/>
			结束日期: <input class="easyui-datebox" name="endDate"/>
			<a class="easyui-linkbutton" iconCls="icon-search" onclick="click_search()">Search</a>
		</form>     
	</div>
	<table id="dg" data-options="toolbar:'#toolbar', rownumbers:true,singleSelect:false,pagination:true,idField:'billId',
            	sortOrder:'desc', sortName:'billTime',editing:false,fit:true, pageSize:20
            ">
        <thead>
            <tr>
            	<th data-options="field:'checked'" checkbox='true'>主键</th>
           	 	<th data-options="field:'billId'" hidden='true'>主键</th>
           	 	<th data-options="field:'acountId'" hidden='true'>主键</th>
           	 	<th data-options="field:'billTime',width:150,order:'desc',editor:'datetimebox'" sortable="true">交易时间</th>
                <th data-options="field:'billType',width:80, formconfig:{type:'combobox',options:{flexset:'TRADE_TYPE'}}">类别</th>
                <th data-options="field:'secId',width:80">代码</th>
                <th data-options="field:'secName',   width:90, formatter:secNameFormatter ">名称</th>
                <th data-options="field:'billMoney',width:80,align:'right',sortable:true, editor:{type:'numberbox',options:{precision:2}}">交易金额</th>
                <th data-options="field:'billTradeMoney',width:80,align:'right',sortable:true, editor:{type:'numberbox',options:{precision:2}}">交易净额</th>
                <th data-options="field:'secNum',width:80,align:'right',editor:'numberbox',styler:profitStyle">数量</th>
                <th data-options="field:'secPrice',width:80,align:'right',editor:{type:'numberbox',options:{precision:3}}">价格</th>
                <th data-options="field:'bondInterest',width:80,align:'right',editor:{type:'numberbox',options:{precision:3}}">利息</th>
                <th data-options="field:'feeCommision',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">佣金</th>
                <th data-options="field:'feeTax',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">印花</th>
                <th data-options="field:'feeOther',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">其它</th>
                <th data-options="field:'feeAll',width:80,align:'right',editor:{type:'numberbox',options:{precision:2}}">费用合计</th>
                <th data-options="field:'billDesc',width:300">说明</th>
            </tr>
        </thead>
    </table>
 
   	<div id="dlg" class="easyui-dialog" style="width:490px;height:350px" data-options="title:'交易管理',modal:true,toolbar:'#dlg-toolbar',resizable:true">
		<form id="ff" class="easyui-flexform" data-options="cellMargin:5,cellWidth:220">
			<input name="billId" type="hidden"/>
			<input name="acountId" type="hidden"/>
			<div>
				<label>类别:</label>
				<div><input id="billType" class="easyui-combobox" name="billType" 
					data-options="valueField:'code',textField:'name',data:frame.flex.getValue('TRADE_TYPE'),required:true,onChange:billTypeChange"/></div>
			</div>
			<div>
				<label>证券:</label>
				<div><input id="secIdInput" class="easyui-combogrid" name="secId"/></div>
			</div>
			<div>
				<label>交易时间:</label>
				<div><input class="easyui-datetimebox" name="billTime"/></div>
			</div>
			<div>
				<label>交易净额:</label>
				<div><input id="billTradeMoney" class="easyui-numberbox" name="billTradeMoney" data-options="precision:2"/></div>
			</div>
			<div>
				<label>数量:</label>
				<div><input id="secNum" class="easyui-numberbox" name="secNum" data-options=""/></div>
			</div>
			<div>
				<label>价格:</label>
				<div><input id="secPrice" class="easyui-numberbox" name="secPrice" data-options="precision:4"/></div>
			</div>
			<div>
				<label>佣金:</label>
				<div><input id="feeCommision" class="easyui-numberbox" name="feeCommision" data-options="precision:4"/></div>
			</div>
			<div>
				<label>印花红利税:</label>
				<div><input id="feeTax" class="easyui-numberbox" name="feeTax" data-options="precision:4"/></div>
			</div>
			<div>
				<label>过户费:</label>
				<div><input id="feeOther" class="easyui-numberbox" name="feeOther" data-options="precision:4"/></div>
			</div>
			<div>
				<label>费用合计:</label>
				<div><input class="easyui-numberbox" name="feeAll" data-options="precision:4,disabled:true"/></div>
			</div>
			<div colspan="2">
				<label>说明:</label>
				<div><input class="easyui-textbox" name="billDesc" data-options="width:390,height:50,multiline:true"/></div>
			</div>
		</form>
	</div>

	<div id="dlg-toolbar">
	   <a class="easyui-linkbutton" iconCls='icon-save' onclick="dlg_click_save()">保存</a>
       <a class="easyui-linkbutton" iconCls="icon-remove" onclick="dlg_click_delete()">删除</a>
       <a class="easyui-linkbutton" iconCls="icon-undo" onclick="dlg_click_cancle()">取消</a>
       &nbsp;<input id="feeAutoButton" class="easyui-switchbutton" style="height:22px;width:80px" checked data-options="onText:'税费自动',offText:'税费手动',onChange:feeAutoChange"/>
	</div>

</body>
</html>
